#ifndef UNITS_H
#define UNITS_H

#include <stdio.h>
	
class Units {
	public:

		static const double GRAVITY = 6.6738e-8;
		static const double SOLAR_MASS = 1.989e33;
		static const double CM_PER_MPC = 3.085678e24;    
		static const double HUBBLE = 1.0;     // Hubble constant in 100km/sec/Mpc 
		static const int GB = 1024*1024*1024;
		
		
		double l;
		double v;
		double m;
		
		Units() {
			
			m = 1e10*1.989e33;	// 10^10 solar masses [g] 
			l = CM_PER_MPC/1e3;	// 1 kpc  [cm]
			v = 1e5;					// 1 km/sec [cm]
			
		}
		
		double t()  { return l/v; }
		double G()  { return GRAVITY / pow(l, 3) *m * pow(t(), 2);	 }
		double H0() { return HUBBLE * 100 * 1e5 / CM_PER_MPC / v * l; }

		
		void print() {
			
			printf("Units::print()\n");
			printf(" ├ m = %g\n", m );
			printf(" ├ l = %g\n", l );
			printf(" ├ v = %g\n", v );
			printf(" ├ t = %g\n", t());
			printf(" ├ G = %g\n", G());
			printf(" └ H0= %g\n",H0());
			
		}
};

#endif